Skip to main content

Dialog: Credentials needed

Function: The dialog is used to provide the credentials for access to the remote repository.

Call: The dialog opens when you want to access a protected remote repository from CODESYS Git. For example, this is done with the Fetch command in the Remotes view.

After a server-dependent number of failed attempts to provide correct credentials, the operation is aborted with an corresponding message.

Important

Make sure you have a secure connection to a remote server. For more information, see: Security for CODESYS Git

Tip

The credentials are saved in the Windows Credential Manager and is derived from the URL of the remote repository. A git: is prepended. Example: The credentials with the URL git:https://gitlab.com/user/privateproject.git are automatically used for Git operations which access the remote repository at the URL https://gitlab.com/user/privateproject.git.

In the Git Remotes view, you can change the credentials for the remote repository via the Git server. You do not need to switch to the Windows Credential Manager to do this. See below for information about handling domain-specific credentials.

User

User name for the remote repository

Password

Password for the remote repository, an empty password is possible

Save

standard icon: The credentials are automatically saved in the Windows Credential Manager.

When you access the remote repository again afterwards, you will no longer be prompted to provide the credentials.

Domain-specific credentials

Remote repositories can share a host name or path on a host server. In this case, credentials saved for a host URL can be used for all projects with the same host name.

Example: Credentials which are saved with the URL git:https://gitlab.com/user can be used for a repository with the URL git:https://gitlab.com/user/project1.git as well as for a repository with the URL git:https://gitlab.com/user/project2.git because the URL is part of both repository URLs. This means that only one set of credentials needs to be created for multiple repositories.

Using stored credentials

In CODESYS Git, when a remote operation is performed for which credentials are required, CODESYS Git searches for valid credentials by the following procedure:

Starting from the full URL of the repository, the system searches for stored credentials for each partial path of the URL until an entry is found and then uses this for authentication.

If the credentials are invalid, then a dialog prompt opens with the options:

  • Overwrite current credentials with the new credentials to be entered

  • Delete credentials from the Windows Credentials and search for entries again based on the URL currently displayed.

    If no valid credentials are found with this search, then a dialog prompt opens for you to input your credentials for the most general possible URL. The credentials can then also be used in the future for other projects under this URL.

Two-factor authentication

Two-factor authentication may be required to connect to Git platforms such as GitHub or GitLab. If this is the case, then you first need to create a PAT (Personal Access Token) in the respective platform and specify this in CODESYS Git in the Credentials needed dialog instead of the password or user name. The following table contains information for creating and using a PAT for the individual Git platforms.

Git Platform

Required Information for Authentication

Detailed Information for Creating the PAT

GitHub

User: User name

Password: PAT (instead of the password)

GitHub: PAT

GitLab

User: User name optional (currently ignored)

Password: PAT (instead of the password)

GitLab: Personal access tokens

Bitbucket

User: User name

Password: PAT (instead of the password)

Bitbucket Support: Create a Repository Access Token